public class TestDelay {
	//PageReference p;
	
	String accId;
	public TestDelay(){
		accId = ApexPages.currentPage().getParameters().get('accId');
	}
	public Pagereference delay(){
	
		Delay.sleep(3);
		Pagereference p = new Pagereference('/'+accId);
		p.setRedirect(true);
		return p;
	}
}